Oracle® OLAP Analytic Workspace Java API Reference
10g Release 2 (10.2)

B14351-02

oracle.AWXML
Class AWConnection

java.lang.Object
  |
  +--oracle.AWXML.AWConnection

public class AWConnection
extends java.lang.Object

Establishes a JDBC connection to an Oracle Database instance and a context within the database for processing actions specified by Analytic Workspace Java API objects. When instantiated, an AWConnection object invokes the getConnection method in the oracle.jdbc.DriverManager class to load a JDBC driver and create a connection object.

An AWConnection object is only used by client applications that connect through JDBC. It is not used to implement information stored in XML and executed by the INTERACTIONEXECUTE PL/SQL function.


Field Summary
static java.lang.String CommitMode
          Indicates whether an action method updates the stored analytic workspace and commits those changes in the relational database tables.

 

Constructor Summary
AWConnection(java.lang.String user, java.lang.String pwd, java.lang.String inputConnectString)
          Opens a database connection through JDBC and establishes the OLAP processing environment within the context of this connection.

 

Method Summary
 java.sql.Connection getSQLConnection()
          Gets the java.sql.Connection for this AWConnection.

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Field Detail

CommitMode

public static java.lang.String CommitMode
Indicates whether an action method updates the stored analytic workspace and commits those changes in the relational database tables. Action methods begin with an initial capital letter, such as Create, Delete, and so on. Specify TRUE if you want the action methods to update the stored analytic workspace and commit the changes. Specify FALSE if you want an update and commit to occur only when you use the AWAction package classes. The default value is FALSE.

Constructor Detail

AWConnection

public AWConnection(java.lang.String user,
                    java.lang.String pwd,
                    java.lang.String inputConnectString)
Opens a database connection through JDBC and establishes the OLAP processing environment within the context of this connection. The arguments to the AWConnection constructor are a user ID, a password, and a connect string.

For a thin connection (recommended) specify a connect string with the format:

 host_name:port#:SID
where host_name is the name of the host computer, port# is the number of the port for the connection, and SID is the name of this database instance (service identifier). AWConnection uses this input to construct the connect string jdbc:oracle:thin:@host_name:port#:SID which it passes to oracle.jdbc.DriverManager.GetConnection to create the connection.

For a thick connection specify the name of an entry in the tnsnames.ora file as the connect string. AWConnection uses this name to construct the connect string jdbc:oracle:oci:@tnsnames_descriptor which it passes to oracle.jdbc.DriverManager.GetConnection to create the connection.

The following illustrates a thin connection to the main instance of the Database at port 1521 on the machine mysun-sun:

   String conn1 = "mysun-sun.us.oracle.com:1521:main";
   String user = "global";
   String pwd = "global";
   String conn = conn1;
          try {
             AWConnection awConnection = new AWConnection(user, pwd, conn);
             }
          catch (Exception e) {
             System.out.println(e);
             } 
Parameters:
user - The user ID for the connection.
pwd - The password for the connection.
inputConnectString - The connect string that specifies the connection.

Method Detail

getSQLConnection

public java.sql.Connection getSQLConnection()
Gets the java.sql.Connection for this AWConnection.
Returns:
The java.sql.Connection for this AWConnection.

Oracle® OLAP Analytic Workspace Java API Reference
10g Release 2 (10.2)

B14351-02

Copyright © 2003, 2005 Oracle. All rights reserved.